package org.goldfish.chatroom.entity;

import java.time.LocalDateTime;

/**
 * VerificationMessage: class for verification message
 * the verification method of this website
 * is to generate a random number and
 * send it to the administrator's email
 *
 * @see org.goldfish.chatroom.controller.VerificationController
 */
public class VerificationMessage {
    private long serialNumber;
    private LocalDateTime time;

    /**
     * default constructor
     * generates a random serial number
     * and records the time of generation
     */
    public VerificationMessage() {
        double defaultSerialNumber;
        defaultSerialNumber = Math.random() * 0xffffffffffffffL;
        setSerialNumber((long) defaultSerialNumber);
        setTime(LocalDateTime.now());
    }

    public long getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(long serialNumber) {
        this.serialNumber = serialNumber;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }
}
